home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_HDF.idb / usr / freeware / include / hdf / hlimits.h.z / hlimits.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  8.9 KB  |  234 lines

  1. /****************************************************************************
  2.  * NCSA HDF                                                                 *
  3.  * Software Development Group                                               *
  4.  * National Center for Supercomputing Applications                          *
  5.  * University of Illinois at Urbana-Champaign                               *
  6.  * 605 E. Springfield, Champaign IL 61820                                   *
  7.  *                                                                          *
  8.  * For conditions of distribution and use, see the accompanying             *
  9.  * hdf/COPYING file.                                                        *
  10.  *                                                                          *
  11.  ****************************************************************************/
  12.  
  13. /* $Id: hlimits.h,v 1.15 1998/02/02 21:44:01 smitchel Exp $ */
  14.  
  15. /*+ hlimits.h
  16.    *** This file contains all hard coded limits for the library
  17.    *** and reserved vdata/vgroup names and classes. 
  18.    *** Also pre-defined attribute names are contained in thie file.
  19.    + */
  20.  
  21. #ifndef _HLIMITS_H
  22. #define _HLIMITS_H
  23.  
  24. /* ------------------------- General Constants hdf.h  --------------------- */
  25. /* tbuf used as a temporary buffer for small jobs.  The size is
  26.    preferably > 512 but MUST be > ~256.  It is advised that if an
  27.    arbitrarily large buffer (> 100 bytes) is require, dynamic space be
  28.    used.  tbuf lives in the hfile.c */
  29.  
  30. #ifndef TBUF_SZ
  31. #if defined(macintosh) || defined(MAC) || defined(SYMANTEC_C)
  32. #   define TBUF_SZ      256
  33. #else  /* !macintosh */
  34. #   define TBUF_SZ     1024
  35. #endif /* !macintosh */
  36. #endif
  37.  
  38. /*  File name max length (old annotations)  */
  39. #define DF_MAXFNLEN     256
  40.  
  41. /*
  42.    * some max lengths for the Vset interface
  43.    *
  44.    * Except for FIELDNAMELENMAX, change these as you please, they
  45.    * affect memory only, not the file.
  46.    *
  47.  */
  48.  
  49. #define FIELDNAMELENMAX    128  /* fieldname   : 16 chars max */
  50. #define VSFIELDMAX         256  /* max no of fields per vdata */
  51. #define VSNAMELENMAX        64  /* vdata name  : 64 chars max */
  52. #define VGNAMELENMAX        64  /* vgroup name : 64 chars max */
  53.  
  54. /*
  55.  * default max no of objects in a vgroup
  56.  * VGroup will grow dynamically if needed
  57.  */
  58. #define MAXNVELT            64
  59.  
  60. /*
  61.  * Defaults for linked block operations with Vsets
  62.  */
  63. #define VDEFAULTBLKSIZE    4096
  64. #define VDEFAULTNBLKS        32
  65.  
  66. /* Max order of a field in a Vdata */
  67. #define MAX_ORDER          65535
  68. #define MAX_FIELD_SIZE     65535
  69.  
  70.  
  71. /* ------------------------- Constants for hfile.c --------------------- */
  72. /* Maximum number of files (number of slots for file records) */
  73. #ifndef MAX_FILE
  74. #   define MAX_FILE   32
  75. #endif /* MAX_FILE */
  76.  
  77. /* Maximum length of external filename(s) (used in hextelt.c) */
  78. #ifndef MAX_PATH_LEN
  79. #define MAX_PATH_LEN     1024
  80. #endif /* MAX_PATH_LEN */
  81.  
  82. /* ndds (number of dd's in a block) default,
  83.    so user need not specify */
  84. #ifndef DEF_NDDS
  85. #   define DEF_NDDS 16
  86. #endif /* DEF_NDDS */
  87.  
  88. /* ndds minimum, to prevent excessive overhead of very small dd-blocks */
  89. #ifndef MIN_NDDS
  90. #   define MIN_NDDS 4
  91. #endif /* MIN_NDDS */
  92.  
  93. /* largest number that will fit into 16-bit word ref variable */
  94. #define MAX_REF ((uint16)65535)
  95.  
  96. /* length of block and number of blocks for converting 'appendable' data */
  97. /* elements into linked blocks (will eventually be replaced by the newer */
  98. /* variable-length blocks */
  99. #define HDF_APPENDABLE_BLOCK_LEN 4096
  100. #define HDF_APPENDABLE_BLOCK_NUM 16
  101.  
  102. /* hashing information */
  103. #define HASH_MASK       0xff
  104. #define HASH_BLOCK_SIZE 100
  105.  
  106. /* ------------------------- Constants for Vxx interface --------------------- */
  107.  
  108. /*
  109.  * Private conversion buffer stuff
  110.  * VDATA_BUFFER_MAX is the largest buffer that can be allocated for
  111.  *   writing (haven't implemented reading yet).
  112.  * Vtbuf is the buffer
  113.  * Vtbufsize is the buffer size in bytes at any given time.
  114.  * Vtbuf is increased in size as need be
  115.  * BUG: the final Vtbuf never gets freed
  116.  */
  117. #define VDATA_BUFFER_MAX 1000000
  118.  
  119. /* --------------------- Constants for DFSDxx interface --------------------- */
  120.  
  121. #define DFS_MAXLEN 255       /*  Max length of label/unit/format strings */
  122. #define DFSD_MAXFILL_LEN 16  /* Current max length for fill_value space */
  123.  
  124. /* ----------------- Constants for COMPRESSION interface --------------------- */
  125.  
  126. /* Set the following macro to the value the highest compression scheme is */
  127. #define COMP_MAX_COMP   12
  128.  
  129. /* ----------------- Constants for DGROUP interface --------------------- */
  130. #define MAX_GROUPS 8
  131.  
  132. /* ----------------- Constants for HERROR interface --------------------- */
  133. #define FUNC_NAME_LEN   32
  134.  
  135. /* error_stack is the error stack.  error_top is the stack top pointer, 
  136.    and points tothe next available slot on the stack */
  137. #ifndef ERR_STACK_SZ
  138. #   define ERR_STACK_SZ 10
  139. #endif
  140.  
  141. /* max size of a stored error description */
  142. #ifndef ERR_STRING_SIZE
  143. #   define ERR_STRING_SIZE 512
  144. #endif
  145.  
  146. /* ----------------- Constants for NETCDF interface(netcdf.h) ---------------- */
  147. /*
  148.  * This can be as large as the maximum number of stdio streams
  149.  * you can have open on your system.
  150.  */
  151. #define MAX_NC_OPEN MAX_FILE
  152.  
  153. /*
  154.  * These maximums are enforced by the interface, to facilitate writing
  155.  * applications and utilities.  However, nothing is statically allocated to
  156.  * these sizes internally.
  157.  */
  158. #define MAX_NC_DIMS 5000     /* max dimensions per file */
  159. #define MAX_NC_ATTRS 3000     /* max global or per variable attributes */
  160. #define MAX_NC_VARS 5000     /* max variables per file */
  161. #define MAX_NC_NAME 256         /* max length of a name */
  162. #define MAX_VAR_DIMS 32          /* max per variable dimensions */
  163.  
  164. /* ----------------- Constants for MFGR interface --------------------- */
  165. #define MAX_GR_NAME 256         /* max length of a name */
  166.  
  167. #endif /* _HLIMITS_H */
  168.  
  169. /* -----------  Reserved classes and names for vdatas/vgroups -----*/
  170.  
  171. /* The names of the Vgroups created by the GR interface, from mfgr.h */
  172. #define GR_NAME "RIG0.0"          /* name of the Vgroup containing all the images */
  173. #define RI_NAME "RI0.0"           /* name of a Vgroup containing information a
  174.                                      bout one image */
  175. #define RIGATTRNAME  "RIATTR0.0N" /* name of a Vdata containing an 
  176.                                      attribute */
  177. #define RIGATTRCLASS "RIATTR0.0C" /* class of a Vdata containing an 
  178.                                      attribute */
  179. /* Vdata and Vgroup attributes use the same class as that of SD attr,
  180.  *  _HDF_ATTRIBUTE  "Attr0.0"  8/1/96 */
  181.  
  182. /* classes of the Vdatas/Vgroups created by the SD interface, 
  183.    from local_nc.h  */
  184. #define _HDF_ATTRIBUTE         "Attr0.0" 
  185.         /* class of a Vdata containing SD interface attribute */
  186. #define _HDF_VARIABLE          "Var0.0"
  187.         /* class of a Vgroup representing an SD NDG */
  188. #define _HDF_DIMENSION         "Dim0.0"
  189.         /* class of a Vgroup representing an SD dimension */
  190. #define _HDF_UDIMENSION        "UDim0.0"
  191.         /* class of a Vgroup representing an SD UNLIMITED dimension*/
  192. #define DIM_VALS          "DimVal0.0"
  193.         /* class of a Vdata containing an SD dimension size and fake values */
  194. #define DIM_VALS01        "DimVal0.1"
  195.              /* class of a Vdata containing an SD dimension size */
  196. #define _HDF_CDF               "CDF0.0"
  197. /* DATA is defined in DTM. Change DATA to DATA0 
  198.   #define DATA              "Data0.0" */
  199. #define DATA0             "Data0.0"
  200. #define ATTR_FIELD_NAME   "VALUES"
  201.  
  202. /* The following vdata class name is reserved by the Chunking interface.
  203.    originally defined in 'hchunks.h'. The full class name 
  204.    currently is "_HDF_CHK_TBL_0". -GV 9/25/97 */
  205. #ifdef   _HCHUNKS_MAIN_
  206. /* Private to 'hchunks.c' */
  207. #define _HDF_CHK_TBL_CLASS "_HDF_CHK_TBL_" /* 13 bytes */
  208. #define _HDF_CHK_TBL_CLASS_VER  0          /* zero version number for class */
  209. #endif /* _HCHUNKS_MAIN_ */
  210.  
  211.  
  212. /* ------------  pre-defined attribute names ---------------- */
  213. /* For MFGR interface */
  214. #define FILL_ATTR    "FillValue"   
  215.           /* name of an attribute containing the fill value */
  216.  
  217. /* For SD interface  */
  218. #define _FillValue      "_FillValue"
  219.           /* name of an attribute to set fill value for an SDS */
  220. #define _HDF_LongName "long_name" /* data/dimension label string  */
  221. #define _HDF_Units    "units"     /* data/dimension unit string   */
  222. #define _HDF_Format   "format"    /* data/dimension format string */
  223. #define _HDF_CoordSys "coordsys"  /* data coordsys string         */
  224. #define _HDF_ValidRange     "valid_range" /* valid range of data values  */
  225. #define _HDF_ScaleFactor    "scale_factor" /* data calibration factor    */
  226. #define _HDF_ScaleFactorErr "scale_factor_err" /* data calibration factor error */
  227. #define _HDF_AddOffset      "add_offset" /* calibration offset           */
  228. #define _HDF_AddOffsetErr   "add_offset_err" /*  calibration offset error */
  229. #define _HDF_CalibratedNt   "calibrated_nt"  /* data type of uncalibrated data */
  230. #define _HDF_ValidMax       "valid_max"
  231. #define _HDF_ValidMin       "valid_min"
  232. #define _HDF_Remarks        "remarks"        /* annotation, by DFAN */
  233. #define _HDF_AnnoLabel      "anno_label"     /* annotation label, by DFAN */
  234.